import moment from 'moment'

// 服务费汇总
export const tableFuwufeihuizongThead = [
  {
    title: '类型',
    key: 'typeName',
    width: 120,
    fixed: 'left'
  },
  {
    title: '社保服务费',
    key: 'SISFSumTotal'
  },
  {
    title: '公积金服务费',
    key: 'CPFSFSumTotal',
    width: 150
  },
  {
    title: '商保服务费',
    key: 'CISFSumTotal'
  },
  {
    title: '薪资服务费',
    key: 'SSFSumTotal'
  },
  {
    title: '服务费合计',
    // key: 'totalAmt'
    key: 'SFSumTotal'
  }
]

// 服务费明细
export const tableFuwufeimingxiThead = [
  // {
  //   type: 'selection',
  //   width: 60,
  //   align: 'center'
  // },
  {
    title: '子公司名称',
    key: 'companyName',
    width: 200
  },
  {
    title: '姓名',
    key: 'employeeName',
    width: 100
  },
  {
    title: '身份证号码',
    key: 'idCardNo',
    width: 200
  },
  {
    title: '服务月份',
    key: 'month',
    width: 150,
    render: (h, params) => {
      const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
      const text = params.row.year + '' + month
      return h('span', text)
    }
  },
  {
    title: '社保服务费',
    key: 'socialSecurityAmt',
    width: 150
  },
  {
    title: '公积金服务费',
    key: 'providentFundAmt',
    width: 150
  },
  {
    title: '商保服务费',
    key: 'commercialInsuranceAmt',
    width: 150
  },
  {
    title: '薪资服务费',
    key: 'salaryAmt',
    width: 150
  },
  {
    title: '服务费合计',
    key: 'totalAmt',
    width: 150
  }
]

// 薪资明细
export const tableXinzimingxiThead = [
  {
    title: '子公司名称',
    key: 'companyName',
    width: 200
  },
  {
    title: '姓名',
    key: 'employeeName',
    width: 100
  },
  {
    title: '身份证号码',
    key: 'idCardNo',
    width: 200
  },
  {
    title: '开户行',
    key: 'bankName',
    width: 150
  },
  {
    title: '卡号',
    key: 'bankAccountNo',
    width: 200
  },
  {
    title: '手机号码',
    key: 'phone',
    width: 200
  },
  {
    title: '工资月份',
    key: 'salaryMonth',
    width: 120,
    render: (h, params) => {
      const text = params.row.salaryMonth.substring(0, 7)
      return h('span', text)
    }
  },
  {
    title: '计薪起止时间',
    key: 'salaryStartTime',
    width: 200,
    render: (h, params) => {
      const text = moment(params.row.salaryStartTime).format('YYYY.MM.DD') + '-' + moment(params.row.salaryEndTime).format('YYYY.MM.DD')
      return h('span', text)
    }
  },
  {
    title: '工资发放日期',
    key: 'payDate',
    width: 120,
    render: (h, params) => {
      const text = moment(params.row.payDate).format('YYYY-MM-DD')
      return h('span', text)
    }
  },
  {
    title: '收入类型',
    key: 'incomeTypeName',
    width: 240
  },
  {
    title: '应发工资总额',
    key: 'shouldSalaryTotal',
    width: 120
  },
  {
    title: '社保扣除',
    key: 'socialSecurityDeduct',
    width: 120
  },
  {
    title: '公积金扣除',
    key: 'providentFundDeduct',
    width: 120
  },
  {
    title: '专项附加扣除',
    key: 'specialDeduct',
    width: 120
  },
  {
    title: '其他扣除',
    key: 'otherDeduct',
    width: 120
  },
  {
    title: '个税扣除',
    key: 'incomeDeduct',
    width: 120
  },
  {
    title: '手续费',
    key: 'serviceCharge',
    width: 120
  },
  {
    title: '税后扣除',
    minWidth: 120,
    key: 'afterTaxDeduct'
  },
  {
    title: '累积抵扣',
    minWidth: 120,
    key: 'historyDeduct'
  },
  {
    title: '实发工资总额',
    key: 'realSalaryTotal',
    width: 120
  },
  {
    title: '备注',
    minWidth: 120,
    key: 'description'
  },
]

// 商保明细
export const tableShangbaomingxiThead = [
  {
    title: '子公司名称',
    key: 'companyName',
    width: 200
  },
  {
    title: '姓名',
    key: 'employeeName',
    width: 100
  },
  {
    title: '身份证号码',
    key: 'idCardNo',
    width: 200
  },
  {
    title: '参保编号',
    key: 'insureNo'
  },
  {
    title: '参保月份',
    key: 'month',
    render: (h, params) => {
      const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
      const text = params.row.year + '' + month
      return h('span', text)
    }
  },
  {
    title: '保险金额',
    key: 'totalAmt'
  }
]

// 公积金明细
export const tableGongjijinmingxiThead = [
  {
    title: '子公司名称',
    key: 'companyName',
    width: 200
  },
  {
    title: '姓名',
    key: 'employeeName',
    width: 100
  },
  {
    title: '身份证号码',
    key: 'idCardNo',
    width: 200
  },
  {
    title: '参保编号',
    key: 'insureNo',
    width: 200
  },
  {
    title: '参保月份',
    key: 'month',
    width: 200,
    render: (h, params) => {
      const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
      const text = params.row.year + '' + month
      return h('span', text)
    }
  },
  {
    title: '单位',
    key: 'company',
    width: 300,
    align: 'center',
    children: [
      {
        title: '基数',
        key: 'ProvidentFundcompanybaseAmt',
        width: 100
      },
      {
        title: '比例',
        key: 'ProvidentFundcompanyrate',
        width: 100,
        render: (h, params) => {
          const text = params.row.ProvidentFundcompanyrate ? params.row.ProvidentFundcompanyrate + '%' : '0%'
          return h('span', text)
        }
      },
      {
        title: '金额',
        key: 'ProvidentFundcompanyamt',
        width: 100
      }
    ]
  },
  {
    title: '个人',
    key: 'employee',
    width: 300,
    align: 'center',
    children: [
      {
        title: '基数',
        key: 'ProvidentFundemployeebaseAmt',
        width: 100
      },
      {
        title: '比例',
        key: 'ProvidentFundemployeerate',
        width: 100,
        render: (h, params) => {
          const text = params.row.ProvidentFundemployeerate ? params.row.ProvidentFundemployeerate + '%' : '0%'
          return h('span', text)
        }
      },
      {
        title: '金额',
        key: 'ProvidentFundemployeeamt',
        width: 100
      }
    ]
  },
  {
    title: '公积金合计',
    key: 'totalAmt',
    width: 120
  }
]

// 社保明细
export const tableShebaomingxiThead = [
  {
    title: '子公司名称',
    key: 'companyName',
    width: 200
  },
  {
    title: '姓名',
    key: 'employeeName',
    width: 100
  },
  {
    title: '身份证号码',
    key: 'idCardNo',
    width: 200
  },
  {
    title: '参保编号',
    key: 'insureNo',
    width: 200
  },
  {
    title: '参保月份',
    key: 'month',
    width: 200,
    render: (h, params) => {
      const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
      const text = params.row.year + '' + month
      return h('span', text)
    }
  },
  {
    title: '养老保险',
    key: 'Pension',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'PensioncompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'Pensioncompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.Pensioncompanyrate ? params.row.Pensioncompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'Pensioncompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'PensionemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'Pensionemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.Pensionemployeerate ? params.row.Pensionemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'Pensionemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '医疗保险',
    key: 'MedicalCare',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'MedicalCarecompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'MedicalCarecompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.MedicalCarecompanyrate ? params.row.MedicalCarecompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'MedicalCarecompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'MedicalCareemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'MedicalCareemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.MedicalCareemployeerate ? params.row.MedicalCareemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'MedicalCareemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '失业保险',
    key: 'Unemployment',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'UnemploymentcompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'Unemploymentcompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.Unemploymentcompanyrate ? params.row.Unemploymentcompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'Unemploymentcompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'UnemploymentemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'Unemploymentemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.Unemploymentemployeerate ? params.row.Unemploymentemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'Unemploymentemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '工伤保险',
    key: 'InjuryOnTheJob',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'InjuryOnTheJobcompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'InjuryOnTheJobcompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.InjuryOnTheJobcompanyrate ? params.row.InjuryOnTheJobcompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'InjuryOnTheJobcompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'InjuryOnTheJobemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'InjuryOnTheJobemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.InjuryOnTheJobemployeerate ? params.row.InjuryOnTheJobemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'InjuryOnTheJobemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '生育保险',
    key: 'Birth',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'BirthcompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'Birthcompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.Birthcompanyrate ? params.row.Birthcompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'Birthcompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'BirthemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'Birthemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.Birthemployeerate ? params.row.Birthemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'Birthemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '大病医疗',
    key: 'SeriousIllness',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'SeriousIllnesscompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'SeriousIllnesscompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.SeriousIllnesscompanyrate ? params.row.SeriousIllnesscompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'SeriousIllnesscompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'SeriousIllnessemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'SeriousIllnessemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.SeriousIllnessemployeerate ? params.row.SeriousIllnessemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'SeriousIllnessemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '残保金',
    key: 'DisabledPersonsSecurityFund',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'DisabledPersonsSecurityFundcompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'DisabledPersonsSecurityFundcompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.DisabledPersonsSecurityFundcompanyrate ? params.row.DisabledPersonsSecurityFundcompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'DisabledPersonsSecurityFundcompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'DisabledPersonsSecurityFundemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'DisabledPersonsSecurityFundemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.DisabledPersonsSecurityFundemployeerate ? params.row.DisabledPersonsSecurityFundemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'DisabledPersonsSecurityFundemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '门诊医疗',
    key: 'OutpatientDepartment',
    align: 'center',
    children: [
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'OutpatientDepartmentcompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'OutpatientDepartmentcompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.OutpatientDepartmentcompanyrate ? params.row.OutpatientDepartmentcompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'OutpatientDepartmentcompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'OutpatientDepartmentemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'OutpatientDepartmentemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.OutpatientDepartmentemployeerate ? params.row.OutpatientDepartmentemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'OutpatientDepartmentemployeeamt',
            width: 100
          }
        ]
      }
    ]
  },
  {
    title: '单位合计',
    key: 'companyTotalAmt',
    width: 120,
    align: 'center'
  },
  {
    title: '个人合计',
    key: 'employeeTotalAmt',
    width: 120,
    align: 'center'
  },
  {
    title: '总合计',
    key: 'totalAmt',
    width: 120,
    align: 'center'
  }
]

// 社保汇总
export const tableShebaohuizongThead = [
  // {
  //   title: '',
  //   key: 'null',
  //   width: 200,
  //   slot: 'leftnav',
  //   fixed: 'left'
  // },
  {
    title: '类型',
    key: 'typeName',
    width: 120,
    fixed: 'left'
  },
  {
    title: '养老保险',
    key: 'Pension',
    width: 120
  },
  {
    title: '医疗保险',
    key: 'MedicalCare',
    width: 120
  },
  {
    title: '失业保险',
    key: 'Unemployment',
    width: 120
  },
  {
    title: '工伤保险',
    key: 'InjuryOnTheJob',
    width: 120
  },
  {
    title: '生育保险',
    key: 'Birth',
    width: 120
  },
  {
    title: '大病医疗',
    key: 'SeriousIllness',
    width: 120
  },
  {
    title: '残保金',
    key: 'DisabledPersonsSecurityFund',
    width: 120
  },
  {
    title: '门诊医疗',
    key: 'OutpatientDepartment',
    width: 120
  },
  {
    title: '月合计',
    key: 'SocialInsuranceSumTotal',
    width: 120
  }
]

// 汇总报表
export const tableHuizongbaobiaoThead = [
  {
    title: '类型',
    key: 'typeName',
    width: 120,
    fixed: 'left'
  },
  {
    title: '养老保险',
    key: 'Pension',
    width: 120
  },
  {
    title: '医疗保险',
    key: 'MedicalCare',
    width: 120
  },
  {
    title: '失业保险',
    key: 'Unemployment',
    width: 120
  },
  {
    title: '工伤保险',
    key: 'InjuryOnTheJob',
    width: 120
  },
  {
    title: '生育保险',
    key: 'Birth',
    width: 120
  },
  {
    title: '大病医疗',
    key: 'SeriousIllness',
    width: 120
  },
  {
    title: '残保金',
    key: 'DisabledPersonsSecurityFund',
    width: 120
  },
  {
    title: '门诊医疗',
    key: 'OutpatientDepartment',
    width: 120
  },
  {
    title: '社保小计',
    key: 'SocialInsuranceSumTotal',
    width: 120
  },
  {
    title: '公积金',
    key: 'ProvidentFundSumTotal',
    width: 120
  },
  {
    title: '商保',
    key: 'CommercialInsuranceSumTotal',
    width: 120
  },
  {
    title: '工资',
    key: 'Salary',
    width: 120
  },
  {
    title: '个税',
    key: 'IncomeTax',
    width: 120
  },
  {
    title: '手续费',
    key: 'HandlingFee',
    width: 120
  },
  {
    title: '社保服务费',
    key: 'SISFSumTotal',
    width: 120
  },
  {
    title: '公积金服务费',
    key: 'CPFSFSumTotal',
    width: 120
  },
  {
    title: '商保服务费',
    key: 'CISFSumTotal',
    width: 120
  },
  {
    title: '薪资服务费',
    key: 'SSFSumTotal',
    width: 120
  },
  {
    title: '服务费小计',
    key: 'SFSumTotal',
    width: 120
  },
  {
    title: '总计',
    key: '0SumTotal',
    width: 120
  }
]

// 明细汇总
export const tableMingxihuizongThead = [
  {
    title: '子公司名称',
    key: 'companyName',
    width: 200
  },
  {
    title: '姓名',
    key: 'employeeName',
    width: 100
  },
  {
    title: '身份证号码',
    key: 'idCardNo',
    width: 200
  },
  {
    title: '社保',
    key: 'socialInsurance',
    align: 'center',
    children: [
      {
        title: '参保编号',
        key: 'socialInsuranceinsureNo',
        width: 200
      },
      {
        title: '参保月份',
        key: 'month',
        width: 200,
        render: (h, params) => {
          const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
          const text = params.row.year + '' + month
          return h('span', text)
        }
      },
      {
        title: '养老保险',
        key: 'Pension',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'PensioncompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'Pensioncompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.Pensioncompanyrate ? params.row.Pensioncompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'Pensioncompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'PensionemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'Pensionemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.Pensionemployeerate ? params.row.Pensionemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'Pensionemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '医疗保险',
        key: 'MedicalCare',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'MedicalCarecompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'MedicalCarecompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.MedicalCarecompanyrate ? params.row.MedicalCarecompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'MedicalCarecompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'MedicalCareemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'MedicalCareemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.MedicalCareemployeerate ? params.row.MedicalCareemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'MedicalCareemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '失业保险',
        key: 'Unemployment',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'UnemploymentcompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'Unemploymentcompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.Unemploymentcompanyrate ? params.row.Unemploymentcompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'Unemploymentcompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'UnemploymentemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'Unemploymentemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.Unemploymentemployeerate ? params.row.Unemploymentemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'Unemploymentemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '工伤保险',
        key: 'InjuryOnTheJob',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'InjuryOnTheJobcompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'InjuryOnTheJobcompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.InjuryOnTheJobcompanyrate ? params.row.InjuryOnTheJobcompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'InjuryOnTheJobcompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'InjuryOnTheJobemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'InjuryOnTheJobemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.InjuryOnTheJobemployeerate ? params.row.InjuryOnTheJobemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'InjuryOnTheJobemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '生育保险',
        key: 'Birth',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'BirthcompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'Birthcompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.Birthcompanyrate ? params.row.Birthcompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'Birthcompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'BirthemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'Birthemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.Birthemployeerate ? params.row.Birthemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'Birthemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '大病医疗',
        key: 'SeriousIllness',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'SeriousIllnesscompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'SeriousIllnesscompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.SeriousIllnesscompanyrate ? params.row.SeriousIllnesscompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'SeriousIllnesscompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'SeriousIllnessemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'SeriousIllnessemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.SeriousIllnessemployeerate ? params.row.SeriousIllnessemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'SeriousIllnessemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '残保金',
        key: 'DisabledPersonsSecurityFund',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'DisabledPersonsSecurityFundcompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'DisabledPersonsSecurityFundcompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.DisabledPersonsSecurityFundcompanyrate ? params.row.DisabledPersonsSecurityFundcompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'DisabledPersonsSecurityFundcompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'DisabledPersonsSecurityFundemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'DisabledPersonsSecurityFundemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.DisabledPersonsSecurityFundemployeerate ? params.row.DisabledPersonsSecurityFundemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'DisabledPersonsSecurityFundemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '门诊医疗',
        key: 'OutpatientDepartment',
        align: 'center',
        children: [
          {
            title: '单位',
            key: 'company',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'OutpatientDepartmentcompanybaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'OutpatientDepartmentcompanyrate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.OutpatientDepartmentcompanyrate ? params.row.OutpatientDepartmentcompanyrate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'OutpatientDepartmentcompanyamt',
                width: 100
              }
            ]
          },
          {
            title: '个人',
            key: 'employee',
            width: 300,
            align: 'center',
            children: [
              {
                title: '基数',
                key: 'OutpatientDepartmentemployeebaseAmt',
                width: 100
              },
              {
                title: '比例',
                key: 'OutpatientDepartmentemployeerate',
                width: 100,
                render: (h, params) => {
                  const text = params.row.OutpatientDepartmentemployeerate ? params.row.OutpatientDepartmentemployeerate + '%' : '0%'
                  return h('span', text)
                }
              },
              {
                title: '金额',
                key: 'OutpatientDepartmentemployeeamt',
                width: 100
              }
            ]
          }
        ]
      },
      {
        title: '单位合计',
        key: 'socialInsurancecompanyTotalAmt',
        width: 120,
        align: 'center'
      },
      {
        title: '个人合计',
        key: 'socialInsuranceemployeeTotalAmt',
        width: 120,
        align: 'center'
      },
      {
        title: '社保合计',
        key: 'socialInsurancetotalAmt',
        width: 120,
        align: 'center'
      }
    ]
  },
  {
    title: '公积金',
    key: 'providentFund',
    align: 'center',
    children: [
      {
        title: '参保编号',
        key: 'providentFundinsureNo',
        width: 200
      },
      {
        title: '参保月份',
        key: 'month',
        width: 200,
        render: (h, params) => {
          const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
          const text = params.row.year + '' + month
          return h('span', text)
        }
      },
      {
        title: '单位',
        key: 'company',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'ProvidentFundcompanybaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'ProvidentFundcompanyrate',
            width: 100,
            render: (h, params) => {
              const text = params.row.ProvidentFundcompanyrate ? params.row.ProvidentFundcompanyrate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'ProvidentFundcompanyamt',
            width: 100
          }
        ]
      },
      {
        title: '个人',
        key: 'employee',
        width: 300,
        align: 'center',
        children: [
          {
            title: '基数',
            key: 'ProvidentFundemployeebaseAmt',
            width: 100
          },
          {
            title: '比例',
            key: 'ProvidentFundemployeerate',
            width: 100,
            render: (h, params) => {
              const text = params.row.ProvidentFundemployeerate ? params.row.ProvidentFundemployeerate + '%' : '0%'
              return h('span', text)
            }
          },
          {
            title: '金额',
            key: 'ProvidentFundemployeeamt',
            width: 100
          }
        ]
      },
      {
        title: '公积金合计',
        key: 'providentFundtotalAmt',
        width: 120
      }
    ]
  },
  {
    title: '商保',
    key: 'commercialInsurance',
    align: 'center',
    children: [
      {
        title: '参保编号',
        key: 'commercialInsuranceinsureNo',
        width: 120
      },
      {
        title: '参保月份',
        key: 'month',
        render: (h, params) => {
          const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
          const text = params.row.year + '' + month
          return h('span', text)
        },
        width: 120
      },
      {
        title: '保险金额',
        key: 'commercialInsurancetotalAmt',
        width: 120
      }
    ]
  },
  {
    title: '服务费',
    key: 'si',
    align: 'center',
    children: [
      {
        title: '服务月份',
        key: 'month',
        width: 120,
        render: (h, params) => {
          const month = params.row.month < 10 ? '0' + params.row.month : '' + params.row.month
          const text = params.row.year + '' + month
          return h('span', text)
        }
      },
      {
        title: '社保服务费',
        key: 'socialSecurityAmt',
        width: 120
      },
      {
        title: '公积金服务费',
        key: 'providentFundAmt',
        width: 150
      },
      {
        title: '商保服务费',
        key: 'commercialInsuranceAmt',
        width: 120
      },
      {
        title: '薪资服务费',
        key: 'salaryAmt',
        width: 120
      },
      {
        title: '服务费合计',
        key: 'serviceFeeTotalAmt',
        width: 120
      }
    ]
  },
  {
    title: '总合计',
    key: 'totalAmt',
    align: 'center',
    width: 200
  }
]
